{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Credits: Forked from [deep-learning-keras-tensorflow](https://github.com/leriomaggio/deep-learning-keras-tensorflow) by Valerio Maggio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# ConvNet HandsOn with Keras"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "## Problem Definition\n",
    "\n",
    "*Recognize handwritten digits*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "## Data\n",
    "\n",
    "The MNIST database ([link](http://yann.lecun.com/exdb/mnist)) has a database of handwritten digits. \n",
    "\n",
    "The training set has $60,000$ samples. \n",
    "The test set has $10,000$ samples.\n",
    "\n",
    "The digits are size-normalized and centered in a fixed-size image. \n",
    "\n",
    "The data page has description on how the data was collected. It also has reports the benchmark of various algorithms on the test dataset. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "### Load the data\n",
    "\n",
    "The data is available in the repo's `data` folder. Let's load that using the `keras` library. \n",
    "\n",
    "For now, let's load the data and see how it looks."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using Theano backend.\n",
      "Using gpu device 0: GeForce GTX 760 (CNMeM is enabled with initial size: 90.0% of memory, cuDNN 4007)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import keras\n",
    "from keras.datasets import mnist"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "outputs": [],
   "source": [
    "!mkdir -p $HOME/.keras/datasets/euroscipy_2016_dl-keras/data/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# Set the full path to mnist.pkl.gz\n",
    "path_to_dataset = \"euroscipy_2016_dl-keras/data/mnist.pkl.gz\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "code_folding": [],
    "collapsed": false,
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading data from https://s3.amazonaws.com/img-datasets/mnist.pkl.gz\n",
      "15024128/15296311 [============================>.] - ETA: 0s"
     ]
    }
   ],
   "source": [
    "# Load the datasets\n",
    "(X_train, y_train), (X_test, y_test) = mnist.load_data(path_to_dataset)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Basic data analysis on the dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# What is the type of X_train?\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# What is the type of y_train?\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# Find number of observations in training data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# Find number of observations in test data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        ..., \n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0]],\n",
       "\n",
       "       [[0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        ..., \n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0]]], dtype=uint8)"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Display first 2 records of X_train\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([5, 0, 4, 1, 9, 2, 1, 3, 1, 4], dtype=uint8)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Display the first 10 records of y_train\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=uint8),\n",
       " array([5923, 6742, 5958, 6131, 5842, 5421, 5918, 6265, 5851, 5949]))"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Find the number of observations for each digit in the y_train dataset \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=uint8),\n",
       " array([ 980, 1135, 1032, 1010,  982,  892,  958, 1028,  974, 1009]))"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Find the number of observations for each digit in the y_test dataset \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(60000, 28, 28)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# What is the dimension of X_train?. What does that mean?\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### Display Images\n",
    "\n",
    "Let's now display some of the images and see how they look\n",
    "\n",
    "We will be using `matplotlib` library for displaying the image"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "from matplotlib import pyplot\n",
    "import matplotlib as mpl\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# Displaying the first training data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP4AAAD7CAYAAABKWyniAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADnRJREFUeJzt3X2MVfWdx/HPV4kPgEEkyxCBBauxazYR0rXGDRpv02xL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NPk/msWennLa1fv77Q/vOOXd77AeQZOzb92qo77rgjmT/00EOF9o/mYR0fwFEoPhAQxQcC\novhAQBQfCIjiAwFRfCAg1vEL6uvrS+Zr1qxJ5nnvG190Hf/hhx9O5vPmzUvmY8aMSeYoL9bxARyF\n4gMBUXwgIIoPBETxgYAoPhAQxQcCYh0fOEWxjg/gKBQfCIjiAwFRfCAgig8ERPGBgHKLb2YTzOx1\nM9tmZlvNbGG2vdPM9prZpuwr/XnIAEojdx3fzMZJGufuW8xspKQ/SZoh6UeS/uLuj+Vcn3V8oA1S\n6/jD8q7s7vsk7csu95nZDknjv/zdDZsSQMuc0H18M5ssaaqkP2SbFpjZFjN7xsxGNXg2AE1Sd/Gz\nm/lrJS1y9z5JKyV9w92nqnqLIHmTH0B51PVcfTMbJunfJP27uy+vkU+S9Ft3v7RG5p2dnQPfVyoV\nVSqVIjMDqEPqPn69xV8j6WN3/8mgbeOy+/8ys7slfdvdb6xxXR7cA9qgUPHNbJqkDZK2SvLsa7Gk\nG1W9v98vqVvS7e7eW+P6FB9og8Jn/II7p/hAG/CyXABHofhAQBQfCIjiAwFRfCAgig8ERPGBgCg+\nEBDFBwKi+EBAFB8IiOIDAVF8ICCKDwRE8YGAKD4QUO7bazeCGe/CDZRJ09+BB0D5cFMfCIjiAwFR\nfCAgig8ERPGBgP4fzOndNhthqDAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x121299e80>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = pyplot.figure()\n",
    "ax = fig.add_subplot(1,1,1)\n",
    "imgplot = ax.imshow(X_train[1], cmap=mpl.cm.Greys)\n",
    "imgplot.set_interpolation('nearest')\n",
    "ax.xaxis.set_ticks_position('top')\n",
    "ax.yaxis.set_ticks_position('left')\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [],
   "source": [
    "# Let's now display the 11th record"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP4AAAD7CAYAAABKWyniAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADbZJREFUeJzt3W+MVfWdx/HPpxKNLYpDXSARVleXrVpjSDfFbNiYW3Gp\n2TRBG2MrJmrdEGOga7Yh8c+TmWz2Ad0HJBpD4r82SKpb1sRFTKq2MZH4BzBtx4UWbBMcqy6M7CLI\nGB4U+e6DueDMOPO7M3PuP+b7fiU3nDnfe+/5cuAz55z7O+dcR4QA5PKlTjcAoP0IPpAQwQcSIvhA\nQgQfSIjgAwm1Lfi2b7C9z/YfbN/XruVOlu0B22/b/q3tXV3Qz5O2B23/94h5PbZftv2O7Zdsz+my\n/nptf2D7N/XHDR3sb6HtV2z/zvZu2/9cn98V63Cc/n5Yn9+Wdeh2jOPb/pKkP0haLul/JL0l6fsR\nsa/lC58k2/sl/W1EfNzpXiTJ9t9LGpL0VERcXZ/3Y0n/FxH/Xv/l2RMR93dRf72SjkXEhk70NJLt\nBZIWRES/7dmSfi1ppaQfqAvWYaG/76kN67BdW/ylkv4YEe9FxJ8l/YeG/5LdxOqiQ5+IeE3S2F9C\nKyVtqk9vknRjW5saYYL+pOH12HERcTAi+uvTQ5L2SlqoLlmHE/R3Ub3c8nXYrv/oF0l6f8TPH+jz\nv2S3CEm/tP2W7dWdbmYC8yJiUBr+jyNpXof7Gc9a2/22n+jkochIti+RtETSDknzu20djuhvZ31W\ny9dh12zhusCyiPiGpH+UtKa+K9vtuu18642SLo2IJZIOSuqGXf7Zkp6VdG99yzp2nXV0HY7TX1vW\nYbuC/6Gkvxzx88L6vK4REQfqfx6S9JyGD0+6zaDt+dLpY8SPOtzPKBFxKD7/0OhxSd/sZD+2Z2k4\nVJsjYmt9dtesw/H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g+kBDBBxJiHL+iRteT\nX3nllcX6ypUrm9lO2zW6X8ChQ4fa1AnGYhwfwCgEH0iI4AMJEXwgIYIPJETwgYQIPpAQ4/gtduLE\niWL9mWeeqfT+u3btKtYfeeSRSu/f6Pvn33777WJ90aJFlZaP6WMcH8AoBB9IiOADCRF8ICGCDyRE\n8IGECD6QEOP4wAzFOD6AUQg+kBDBBxIi+EBCBB9IiOADCTUMvu2Ftl+x/Tvbu23/sD6/1/YHtn9T\nf9zQ+nYBNEPDcXzbCyQtiIh+27Ml/VrSSknfk3QsIjY0eD3j+EAHlMbxZzV6cUQclHSwPj1ke6+k\ni069d9O6BNA2UzrGt32JpCWSdtZnrbXdb/sJ23Oa3BuAFpl08Ou7+c9KujcihiRtlHRpRCzR8B5B\ncZcfQPeY1Ln6tmdJekHSLyLioXHqF0vaFhFXj1OL3t7e0z/XajXVarUqPQOYhNIx/mSD/5Sk/42I\nH42Yt6B+/C/b/yLpmxGxapzX8uEe0AGVgm97maTtknZLivrjQUmrNHy8f1LSgKS7I2JwnNcTfKAD\nKm/xKy6c4AMdwGW5AEYh+EBCBB9IiOADCRF8ICGCDyRE8IGECD6QEMEHEiL4QEIEH0iI4AMJEXwg\nIYIPJETwgYQIPpBQw9trN4PNXbiBbtLyO/AA6D7s6gMJEXwgIYIPJETwgYQIPpDQ/wNWC8HvQkSX\neQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x124541dd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Slideshow",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
